<?php
	include "ip.php";
	include "useragent.php";
	$useragent = $useragents[rand(0,(count($useragents)-1))];
        $ip = $ips[rand(0,(count($ips)-1))];
	$content = getHtml($_REQUEST["url"],$useragent,$ip);
	if(!($content!="" && !strpos($content,"The document has moved")))
		@file_put_contents("result.txt",$ip."\r\n",FILE_APPEND);
	echo $content;

	function getHtml($url,$useragent,$ip)
	{
		$ch = curl_init();
	        if(!empty($ip)){
        	        curl_setopt($ch, CURLOPT_INTERFACE, $ip);
        	}
		curl_setopt($ch, CURLOPT_URL, $url);
		curl_setopt($ch, CURLOPT_REFERER ,$url);
		curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
		curl_setopt($ch, CURLOPT_TIMEOUT, 10);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); 
		$content = curl_exec($ch);
		curl_close($ch);
		return $content;
	}
?>

